package com.lxujia.ruankao.receiver;

import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;

import com.lxujia.ruankao.service.DbInitService;
import com.lxujia.ruankao.util.LogUtil;

public class BootReceiver extends BroadcastReceiver {
    private final static String TAG = "BootReceiver";

    @Override
    public void onReceive(Context context, Intent intent) {
        String action = intent.getAction();
        LogUtil.d(TAG, "onReceive : " + action);

        Intent initDbIntent = new Intent("com.lxujia.ruankao.ACTION_DB_INIT");
        initDbIntent.setComponent(new ComponentName(context, DbInitService.class));
        context.startService(initDbIntent);
    }
}
